<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <link rel="stylesheet" href="../css/style.css" />
    <link rel="stylesheet" href="../css/bootstrap.css" />
    <link rel="stylesheet" href="../css/login.css" />
    <link rel="stylesheet" href="../font_g2yefnmk13r/iconfont.css" />
  </head>
  <body>
    <div class="banner">
      <div class="header">
        <a href="">
          <img
            src="https://img62.ddimg.cn/upload_img/00873/web/logo-1628229920.png
                  "
            alt=""
            class="logo"
        /></a>
        <div class="header-right">
          <p>切换无障碍</p>
          <a href=""
            ><img
              src="http://img61.ddimg.cn/upload_img/00862/web/icon-1-1628495800.png"
              alt=""
            />
            <span>“登陆页面” 改进建议</span></a
          >
        </div>
      </div>
      <div class="center">
        <a href="http://a.dangdang.com/api/data/cpx/link/38930001/1"
          ><img src="../img/login1.png" class="left" alt=""
        /></a>
        <div class="right">
          <div class="con1">
            <div class="check">
              <img src="../img/code.png" alt="" />
              <img src="../img/pass.png" alt="" />
            </div>
            <div class="con11">
              <i>密码登录</i><span>|</span><i>验证码登录</i>
            </div>
            <div class="form">
              <div class="form1">
                <div class="form-floating">
                  <input
                    type="text"
                    class="form-control"
                    id="username1"
                    placeholder="手机号/昵称/邮箱"
                    name="账户"
                  />
                  <label for="username1">手机号/昵称/邮箱</label>
                </div>

                <div class="form-floating mt-3 mb-3">
                  <input
                    type="text"
                    class="form-control"
                    id="password1"
                    placeholder="密码"
                    name="密码"
                  />
                  <label for="password">密码</label>
                </div>
              </div>
              <!-- <div class="form2">
                <input type="text" placeholder="手机号" />
                <input type="password" placeholder="验证码" />
              </div> -->
            </div>
            <p><span>登录即同意</span><a>用户协议，隐私政策</a></p>
            <button id="btnd">登录</button>
            <div class="con12">
              <span id="ce" class="pp">立即注册</span><span>|</span
              ><i>忘记密码</i>
            </div>
          </div>
          <div class="con1 con1_1">
            <div class="con11">
              <span class="iconfont icon-xiangzuo"></span>
              <i>立即注册</i>
            </div>
            <div class="form">
              <div class="form1">
                <div class="form-floating mb-3 mt-3">
                  <input
                    type="text"
                    class="form-control"
                    id="username2"
                    name="账户"
                    placeholder="手机号"
                  />
                  <label for="email">手机号</label>
                </div>

                <div class="form-floating mt-3 mb-3">
                  <input
                    type="text"
                    class="form-control"
                    id="password2"
                    name="密码"
                    placeholder="密码"
                  />
                  <label for="pwd">验证码</label>
                </div>
              </div>
            </div>
            <p><span>登录即同意</span><a href="">用户协议，隐私政策</a></p>
            <button id="btnz">同意并注册</button>
          </div>
          <div class="con2">
            <a href=""><img src="../img/wechat.png" alt="" /></a>
            <a href=""><img src="../img/zhifubao.png" alt="" /></a>
            <a href=""><img src="../img/qq.png" alt="" /></a>
            <a href=""><img src="../img/weibo.png" alt="" /></a>
            <a href=""><img src="../img/baidu.png" alt="" /></a>
          </div>
        </div>
      </div>
      <div class="foot">
        <ul class="nav">
          <li>公司简介<span>|</span></li>
          <li>诚聘英才<span>|</span></li>
          <li>网站联盟<span>|</span></li>
          <li>当当招商<span>|</span></li>
          <li>机构销售<span>|</span></li>
          <li>手机当当<span>|</span></li>
          <li>官方Blog<span>|</span></li>
          <li>知识产权<span>|</span></li>
          <li>热词搜索</li>
        </ul>
        <p>Copyright (C) 当当网 2004-2021, All Rights Reserved</p>
        <p>
          京ICP证041189号<span>|</span>出版物经营许可证
          新出发京批字第直0673号<span>|</span>食品经营许可证：JY11101050363440
        </p>
        <p>
          京ICP备17043473号-1<span>|</span
          ><img src="../img/jing.png" alt="" />京公网安备
          11010502037644号京公网安备11010502037644号<span>|</span>经营许可证编号：合字B2-20160011<span>|</span>互联网药品信息服务资格证
        </p>
        <p>
          互联网违法和不良信息举报电话：4001066666-5
          邮箱：service@cs.dangdang.com
        </p>
        <p>
          网络出版服务许可证（总）网出证（京）字第049号北京当当科文电子商务有限公司，公司地址：北京市朝阳区北三环东路8号静安中心21层
        </p>
        <div class="footer">
          <a href=""><img src="../img/foot-img1.png" alt="" /></a>
          <a href=""><img src="../img/foot-img2.png" alt="" /></a>
          <a href=""><img src="../img/foot-img3.png" id="three" alt="" /></a>
          <a href=""><img src="../img/foot-img4.png" alt="" /></a>
        </div>
      </div>
    </div>
    <script src="../js/lib/jquery-1.11.3.js"></script>
    <script>
      let con1 = document.querySelector(".con1");
      let con1_1 = document.querySelector(".con1_1");
      let ce = document.getElementById("ce");

      let btnd = document.querySelector("#btnd");
      let username1 = document.getElementById("username1");
      let password1 = document.getElementById("password1");
      let username2 = document.getElementById("username2");
      var password2 = document.getElementById("password2");
      var btnz = document.querySelector("#btnz");
      console.log(username1);
      console.log(password1);

      ce.onclick = function () {
        // con1_1.style.opacity = '1';
        // con1_1.style.position.right = '0px';
        con1_1.style.display = "block";
        con1.style.display = "none";
      };
      // btnz.onclick = function () {
      //   if (username2.value == "" || password2.value == "") {
      //     alert("用户或密码不能为空");
      //   } else {
      //     $.get("http://jx.xuzhixiang.top/ap/api/reg.php", {
      //       username: username2.value,
      //       password: password2.value,
      //     }).then((resData) => {
      //       console.log(resData);
      //     });
      //   }
      // };

      //  登录

      btnd.onclick = function () {
        if (username1.value == "" || password1.value == "") {
          alert("用户或密码不能为空");
        } else {
          $.get("http://jx.xuzhixiang.top/ap/api/login.php", {
            username: username1.value,
            password: password1.value,
          }).then((resData) => {
            console.log(resData);
            location.href = "index.html";
          });
        }
        
      };

      //token:1d8a3e268ec4e0c7dc72ab209d29751f

      //uid:139869

      // $.get("http://jx.xuzhixiang.top/ap/api/reg.php", {
      //   username: "ccj",
      //   password: 123456,
      // }).then((resData) => {
      //   console.log(resData);
      // });
      /*  $.get("http://jx.xuzhixiang.top/ap/api/login.php", {
         username: "ccj",
         password: 123456,
       }).then((resData) => {
         console.log(resData);
         Location.href = 'index.html'
       }); */
    </script>
  </body>
</html>
